//
//  WCNOrderDetailInfoTCell.m
//  WCN
//
//  Created by 杨鑫 on 15/7/8.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNOrderDetailInfoTCell.h"
#import "NSString+Utilities.h"
@implementation WCNOrderDetailInfoTCell

- (void)awakeFromNib {
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (void)configWithOrder:(Order *)order
{
    
    
    if ([order.service_Type.serviceName isEqualToString:@"预约护理门诊"]) {
        self.remainCountView.hidden =YES;
        self.buyCountView.hidden =YES;
        self.totalFeeView.hidden =YES;
        
        
    }else{
        self.totalCount.text = [NSString stringWithFormat:@"%d", [order.apptTotal integerValue]];
        self.remainCount.text = [NSString stringWithFormat:@"%d", [order.apptRemaining integerValue]];
        if ([order.orderSource integerValue] == 1) {
            self.xostlabel.text = nil;
        }else {
            self.xostlabel.text = [NSString stringWithFormat:@"¥%.2f", [order.amountPaid floatValue]];
        }

    
    }
    
    
    self.status.text = order.nursingOrder_Status.name;
    if ([order.service_Type.serviceType isEqualToString:@"OTHER"]) {
         self.nurseType.text = order.serviceDesc;
    }else {
        self.nurseType.text = order.service_Type.serviceName;
    
    }
    self.patientName.text = order.patientName;
    self.patientPhone.text = order.patientAccountMobile;
    
    self.nextService.text = @"完成时间:";
    if (order.completeTime) {
        
        self.nextServiceValue.text =[NSString timeToString:order.completeTime];
    }
    else {
        //            cell.nextService.text = @"下次服务:";
        //            cell.nextServiceValue.text = [NSString stringWithFormat:@"%@ %@", self.order.apptDate, self.order.timePeriod];
        self.nextServiceValue.text =@"";
    }

  
 
}
@end
